PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Appearance Manager >

Programming With the Appearance Manager


Definition Function Mapping and Program Registration

One way the Appearance Manager coordinates the system's look and behavior is by mapping standard pre-Appearance Manager definition functions (the 'MBDF' 0 , 'MDEF' 0 , 'WDEF' 0 , 'WDEF' 124 , 'CDEF' 0 , 'CDEF' 1 , and 'CDEF' 63 resources) to their theme-compliant equivalents. With Appearance Manager 1.1, mapping always occurs systemwide. Prior to Appearance Manager 1.1, the user can turn off systemwide appearance and, therefore, systemwide mapping. Programs can ensure that their standard interface elements are mapped--with any version of the Appearance Manager--by registering with the Appearance Manager. See Becoming a Client of the Appearance Manager for more details on registering your program.

Figure 2-10 shows how the Appearance Manager determines whether mapping occurs for standard definition functions.

Figure 2-10  Mapping of standard definition functions

Some mapped definition functions have a slightly different look and behavior than if they were specified directly. For example, since a standard pre-Appearance Manager window definition function can't specify the inclusion of a horizontal zoom box, when the old resource is mapped to a new one, the resulting window still won't have a horizontal zoom box. For this reason (and to eliminate the time spent going through the mapping layer), it's recommended that you specify theme-compliant definition function IDs directly.

Note

Custom definition functions cannot be mapped automatically to theme-compliant equivalents. However, the Appearance Manager does provide functions that you can use to coordinate specific custom interface elements with themes.

The Appearance Manager provides the following functions for registering your program:


© 1999 Apple Computer, Inc. – (Last Updated 29 April 99)